package cn.ym.ymcc.dto;

import cn.ym.ymcc.constant.GlobleConstant;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class UserDto {
    @NotEmpty(message = "图形验证码不能为空")
    private String imageCode;
    //redis里面的那个
    private String imgCodeKey;

    @NotEmpty(message = "手机号不能为空")
    @Pattern(regexp = GlobleConstant.PHONE_REGEX,message = "手机号格式错误")
    private String mobile;
    @NotEmpty(message = "无效密码")
    private String password;
    //1 web端  2=移动端
    private int regChannel;
    @NotEmpty(message = "手机验证码不能为空")
    private String smsCode;
}
